# -*- encoding: utf-8 -*-
"""

PyCharm 15通过使用polar函数来绘制极坐标下的折线图
2024年 10月 27日 15:09
coded by wenyang
文件的主要内容


"""
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt


def main():
    mpl.rcParams['font.sans-serif'] = ['SimHei']
    mpl.rcParams['axes.unicode_minus'] = False
    points = 12
    theta = np.linspace(0, 2 * np.pi, points, endpoint = False)
    r = 30 * np.random.rand(points)
    plt.polar(theta, r, color = "chartreuse", linewidth = 2, marker = "o", markerfacecolor = "b", markeredgecolor = "r", markersize = 12)
    plt.title("极坐标下的折线图")
    plt.show()


if __name__ == "__main__":
    main()
